/*
 * Created: 2022-08-27 09:55:10
 * Author : 涛涛涛
 */

import React, { FC, useContext } from 'react';
import { View, Text } from '@tarojs/components';
import { styled } from 'linaria/react';
import { useClassName } from '@/utils/index';
import Taro from '@tarojs/taro';
export interface IProps extends ICompProps {}
Operation.defaultProps = {} as Partial<IProps>;
function Operation(props: IProps) {
    const { className, style } = props;
    const localClassName = useClassName('Operation', className);
    const handleClickIcon = (command: string) => {
        Taro.showToast({
            title: `点击了${command}`,
            icon: 'none',
        });
    };
    return (
        <RootView className={localClassName} style={style}>
            {/* 这几个功能,暂时没有作用 */}
            {/* <Text className="iconfont" onClick={() => handleClickIcon('刷新')}>
                &#xe605;
            </Text>
            <Text className="iconfont" onClick={() => handleClickIcon('分享')}>
                &#xed2e;
            </Text>
            <Text className="iconfont more" onClick={() => handleClickIcon('更多')}>
                &#xe67f;
            </Text> */}
        </RootView>
    );
}
export default React.memo(Operation as FC<IProps>);
const RootView = styled(View)`
    &.Operation {
        margin: -20px;
        width: 260px;
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        .iconfont {
            padding: 20px;
            color: #333;
            font-size: 30px;
        }
        .more {
            transform: rotate(90deg);
        }
    }
`;
